Skip to content

🩹 Fix double hash in Table of Contents navigation URLs#1202

Merged
mariush2 merged 1 commit into
mainfrom
fix/double-has-in-toc
Jan 12, 2026
Merged

🩹 Fix double hash in Table of Contents navigation URLs#1202
mariush2 merged 1 commit into
mainfrom
fix/double-has-in-toc

Conversation

@benjamin-lyon
Copy link
Copy Markdown
Contributor

@benjamin-lyon benjamin-lyon commented Jan 9, 2026

  • Needs to be tested locally by reviewer

Description

TanStack Router automatically prepends # to hash values. Removed manual prefix to fix double hashes in URLs (/faq##faq-1 instead of /faq#faq-1)

Copilot AI review requested due to automatic review settings January 9, 2026 11:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where Table of Contents navigation URLs were generating double hashes (e.g., ##section-id instead of #section-id). The issue was caused by manually prepending a # symbol when TanStack Router's navigate() function already adds it automatically.

Key Changes:

  • Removed manual # prefix from hash parameter in two navigate() calls within TableOfContentsProvider

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@benjamin-lyon benjamin-lyon marked this pull request as ready for review January 9, 2026 12:03
@benjamin-lyon benjamin-lyon requested a review from a team as a code owner January 9, 2026 12:03
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 9, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% (🎯 100%) 16608 / 16608
🔵 Statements 100% (🎯 100%) 16608 / 16608
🔵 Functions 100% (🎯 100%) 1200 / 1200
🔵 Branches 100% (🎯 100%) 4136 / 4136
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/providers/TableOfContentsProvider.tsx 100% 100% 100% 100%
Generated in workflow #2047 for commit 6940acb by the Vitest Coverage Report Action

@mariush2 mariush2 merged commit 8350f76 into main Jan 12, 2026
28 of 31 checks passed
@mariush2 mariush2 deleted the fix/double-has-in-toc branch January 12, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants